package com.learn.adapter.composition_adapter;

import lombok.Getter;
import lombok.Setter;
import lombok.extern.slf4j.Slf4j;

/**
 * <p>项目名称: design-pattern </p>
 * <p>文件名称: Adapter2 </p>
 * <p>描述: TODO </p>
 *
 * @author zhousiqi
 * @version v0.0.1
 * @since 2018/10/18 14:55
 */
@Slf4j
@Setter
@Getter
public class Adapter2 implements Target2 {

    private Adaptee2 adaptee2;

    public Adapter2(Adaptee2 adaptee2) {
        this.adaptee2 = adaptee2;
    }

    @Override
    public void work() {
        log.info("operation_work 适配 work");
        adaptee2.operation_work();
    }

    @Override
    public void talk() {
        log.info("operation_talk 适配 talk");
        adaptee2.operation_talk();
    }
}
